package router

import (
	v1 "gin-vue-admin/api/v1"

	"github.com/gin-gonic/gin"
)

func InitGoodsRouter(Router *gin.RouterGroup) {
	GoodsRouter := Router.Group("goods")
	// GoodsRouter := Router.Group("goods").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler()).Use(middleware.OperationRecord())
	{
		GoodsRouter.POST("createGoods", v1.CreateGoods)             // 新建Goods
		GoodsRouter.DELETE("deleteGoods", v1.DeleteGoods)           // 删除Goods
		GoodsRouter.DELETE("deleteGoodsByIds", v1.DeleteGoodsByIds) // 批量删除Goods
		GoodsRouter.PUT("updateGoods", v1.UpdateGoods)              // 更新Goods
		GoodsRouter.GET("findGoods", v1.FindGoods)                  // 根据ID获取Goods
		GoodsRouter.GET("getGoodsList", v1.GetGoodsList)            // 获取Goods列表
	}
}
